{% extends "base.html" %}
{% load cache %}

{% block header %}
<div class="jumbotron subhead" id="overview">
	<div class="container">
		<h1>Intrinsic Image Evaluation</h1>
	</div>
</div>
{% endblock %}

{% block content %}
{% cache 21600 content request.get_full_path %}

<div class="page-header">
	<p>This page lists the different intrinsic image algorithms that we
	included in our evaluation, as well as their best parameters found from
	training.  An example decomposition is included for each algorithm.
	See our publication <a href="{% url "publications" "intrinsic" %}" target="_blank">[Bell et al. 2014]</a> for more details.</p>

	<p class="caption">The following is a quantitative comparison of our algorithm against several recent open-source algorithms, using mean weighted human disagreement
	rate (WHDR<sub>10%</sub>). All values were computed using leave-one-out cross validation.</p>
	<div class="row-fluid">
		<div class="offset1 span10">
			<p><img src="/static/img/siggraph2014-fig9.png" /></p>
		</div>
	</div>
</div>

{% for entry in entries %}
{% with a=entry.algorithm %}

<h3>Algorithm: {{ a.slug }}</h3>

<div class="row-fluid">
	<div class="span4">
		<a class="thumbnail" href="{% url "photo-detail" entry.photo_id %}">
			<div class="overlay-wrapper">
				<img src="{{ entry.photo.image_512.url }}" alt=""/>
				<div class="overlay-container">
					<p class="overlay-content">Image</p>
				</div>
			</div>
		</a>
	</div>
	<div class="span4">
		<div class="thumbnail">
			<div class="overlay-wrapper">
				<img src="{{ entry.reflectance_image.url }}" alt=""/>
				<div class="overlay-container">
					<p class="overlay-content">Reflectance</p>
				</div>
			</div>
		</div>
	</div>
	<div class="span4">
		<div class="thumbnail">
			<div class="overlay-wrapper">
				<img src="{{ entry.shading_image.url }}" alt=""/>
				<div class="overlay-container">
					<p class="overlay-content">Shading</p>
				</div>
			</div>
		</div>
	</div>
</div>

{% if a.citation %}
<div class="row-fluid" style="margin-top:10px">
	<div class="span12">
		<p>Citation:</p>
		<div class="well">{{ a.citation.citation_html|safe }}</div>
	</div>
</div>
{% endif %}

<div class="row-fluid">
	<div class="span4">
		<p>Best training parameters: {{ a.parameters_pretty_html|safe }}</p>
	</div>
	<div class="span8">
		<p>Mean result across <a href="{% url "photo-by-category" "all" "ia" %}">all {{ num_photos }} photos</a>:
			<ul>
				<li>Mean weighted human disagreement rate (WHDR): {{ a.iiw_mean_error_pretty }} (&delta;: {{ entry.error_comparison_thresh }})</li>
				<li>Mean runtime: {{ a.iiw_mean_runtime|floatformat:1 }} s</li>
			</ul>
		</p>
	</div>
</div>

<div class="row-fluid">
	<div class="span12">
		<a class="btn" href="{% url "intrinsic-decomposition-by-algorithm" a.id %}">View decompositions using these parameters.</a>
	</div>
</div>

<hr/>

{% endwith %}
{% endfor %}

{% endcache %}
{% endblock %}
